home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
netbsd
/
tools
/
cross-compiling
/
cross.readme
< prev
Wrap
Text File
|
1995-08-03
|
3KB
|
73 lines
August 3, 1995
BEWARE THOSE WHO ENTER HERE.....
================================
This directory contains executables and sources to my own cross compilation
environment from Sparc SunOS 4.1.3_U1 to NetBSD-current. I'd like to
remind *everyone* trying this for him/herself, that we're far from having the
right hooks in the NetBSD sources to automate this process. A lot of what
is in this directory has been created by trial-and-error, although the result
seems to work just fine (I'm compiling all my kernels this way, as well as
system recompiles from time to time). You'll run into problems with programs
such as NetBSD /bin/sh that create helper programs that are run to generate
further source. Unless you tweak those sources, you won't be able to
crosscompile them (I just skip them usually;-)).
One thing to watch out when compiling kernels (same problem actually as with
/bin/sh): the make process wants to create "assym.s" by running a program
just compiled. I usually fix this problem by starting the "make" on the
native NetBSD box, and killing the make after it created assym.s. You might
come up with a better, nicer solution;-)
The gcc included is a modified 2.6.3, sources are in cross-gcc263-src.tar.gz.
There are minor changes in netbsd.h and more changes in the pic generation
code, all m68k dependant though.
Oh, if you want to recompile binaries from the provided sources.. What
I usually do is:
/usr/local/NetBSD/cross/m68k/bin/make
CC='/usr/local/bin/gcc -I/usr/local/NetBSD/cross/sun-include'
Of course you could also rewrite the Makefiles to do just that...
To compile something in the NetBSD environment, I'm using (bash):
$ export PATH=/usr/local/NetBSD/cross/m68k/bin:/usr/local/bin:$PATH
$ make
That way, the system picks all the NetBSD tools automatically because they
appear first in the $PATH.
Here's my directory structure, I'd bet gcc and other stuff depend on it:
/usr/local/NetBSD: contains a NetBSD tree, full with source in usr/src,
headers in usr/include, etc.
/usr/local/NetBSD/cross/m68k/bin: cross binaries
/usr/local/NetBSD/cross/share/mk: cross mk rules
/usr/local/m68k-cbm-netbsd/bin: -> /usr/local/NetBSD/cross/m68k/bin
/usr/local/m68k-cbm-netbsd/include: -> /usr/local/NetBSD/usr/include
/usr/local/m68k-cbm-netbsd/lib: -> /usr/local/NetBSD/usr/lib
/usr/local/lib/gcc-lib/m68k-cbm-netbsd/2.6.3: gcc compiler binaries
Ok, to finish this up, I'd like to remind everyone:
*****************************************************************************
If you don't carry some pioneer spirit in yourself, if you expect to
install-and-run, this suit is definitely NOT for you. You have to be ready
to do some own investigations why certain things might not work the way
they're supposed to. I'm ready to help within certain limits, I really don't
have time though to completely walk you thru your own set up of your new
private Cray or whatever.
*****************************************************************************
For people trying to cross-compile from little-endian systems to big-endian
or vice versa: be careful! I think there might be some hidden traps in both
the assembler and the linker. You were warned... ;-)
You can contact me at "mw@eunet.ch", I'll try to keep copies on
ftp.eunet.ch:/software/os/bsd/NetBSD/cross-current as uptodate as possible.
Good luck, and may the source be with you;-)
-Markus Wild